<template>
	<div id="app">
		<van-nav-bar
			title="Home"
			left-text="返回"
			left-arrow
			@click-left="backToHome"
			v-show="showNavigator"
		/>
		<router-view />
	</div>
</template>

<script>
export default {
	computed: {
		showNavigator: function () {
			if (this.$route.name == 'home') {
				return false;
			} else {
				return true;
			}
		},
	},
	methods: {
		backToHome() {
			this.$router.push({ path: '/' });
		},
	},
};
</script>
